package com.gy.study.dubbo.service;

import com.gy.study.dubbo.User;
import com.gy.study.dubbo.UserInterface;
import org.apache.dubbo.config.annotation.DubboService;

//@DubboService(timeout = 1000) // 提供方超时时间
//@DubboService(methods = {
//        @Method(name="方法名", timeout = 1000)
//})
@DubboService
public class UserInterfaceImpl implements UserInterface {
    @Override
    public String hello(String username) {
        return "hello : " + username;
    }

    @Override
    public User getById(User user) {
//        try {
//            Thread.sleep(3000);
//        } catch (InterruptedException e) {
//            throw new RuntimeException(e);
//        }

        return new User(user.getId(), "sss", 11);


    }
}
